*** ONLINE APPENDIX G: ALTERNATIVE MECHANISMS ***

clear all
cap log close

global path ""
use "$path/Main.dta", clear
cd "$path/"

// Table G1: State Capacity //
rdbwselect_2014 log_pc_x_totexp margin_rel, bwselect(CCT)
local bw_CCT = e(h_CCT)

rdbwselect_2014 log_pc_x_totexp margin_rel, bwselect(IK)
local bw_IK = e(h_IK)

xtset idcode

* Column 1
reg log_pc_x_totexp win shr_i_taxrev, robust cluster(idcode_prov)
estadd ysumm
	
* Column 2
xi: xtreg log_pc_x_totexp win shr_i_taxrev i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 3
reg log_pc_x_totexp win shr_i_taxrev mv_1 dmv_1, robust cluster(idcode_prov)
estadd ysumm

* Column 4
xi: xtreg log_pc_x_totexp win shr_i_taxrev mv_1 dmv_1 i.year, fe robust cluster(idcode_prov)
estadd ysumm
	
* Column 5
reg log_pc_x_totexp win shr_i_taxrev mv_1 dmv_1 mv_2 dmv_2, robust cluster(idcode_prov)
estadd ysumm

* Column 6
xi: xtreg log_pc_x_totexp win shr_i_taxrev mv_1 dmv_1 mv_2 dmv_2 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 7
reg log_pc_x_totexp win shr_i_taxrev if abs(margin_rel) <= `bw_CCT', robust cluster(idcode_prov)
estadd ysumm
		
* Column 8
xi: xtreg log_pc_x_totexp win shr_i_taxrev i.year if abs(margin_rel) <= `bw_CCT', fe robust cluster(idcode_prov)
estadd ysumm

* Column 9
reg log_pc_x_totexp win shr_i_taxrev if abs(margin_rel) <= `bw_IK', robust cluster(idcode_prov)
estadd ysumm
		
* Column 10
xi: xtreg log_pc_x_totexp win shr_i_taxrev i.year if abs(margin_rel) <= `bw_IK', fe robust cluster(idcode_prov)
estadd ysumm

// Table G2: Dynasties and Terms //
rdbwselect_2014 log_pc_x_totexp margin_rel, bwselect(CCT)
local bw_CCT = e(h_CCT)

rdbwselect_2014 log_pc_x_totexp margin_rel, bwselect(IK)
local bw_IK = e(h_IK)

xtset idcode

** Panel A: First-Termer vs. Second/Third Termer **
* Column 1
reg log_pc_x_totexp win term_1v23, robust cluster(idcode_prov)
estadd ysumm
	
* Column 2
xi: xtreg log_pc_x_totexp win term_1v23 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 3
reg log_pc_x_totexp win term_1v23 mv_1 dmv_1, robust cluster(idcode_prov)
estadd ysumm

* Column 4
xi: xtreg log_pc_x_totexp win term_1v23 mv_1 dmv_1 i.year, fe robust cluster(idcode_prov)
estadd ysumm
	
* Column 5
reg log_pc_x_totexp win term_1v23 mv_1 dmv_1 mv_2 dmv_2, robust cluster(idcode_prov)
estadd ysumm

* Column 6
xi: xtreg log_pc_x_totexp win term_1v23 mv_1 dmv_1 mv_2 dmv_2 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 7
reg log_pc_x_totexp win term_1v23 if abs(margin_rel) <= `bw_CCT', robust cluster(idcode_prov)
estadd ysumm
		
* Column 8
xi: xtreg log_pc_x_totexp win term_1v23 i.year if abs(margin_rel) <= `bw_CCT', fe robust cluster(idcode_prov)
estadd ysumm

* Column 9
reg log_pc_x_totexp win term_1v23 if abs(margin_rel) <= `bw_IK', robust cluster(idcode_prov)
estadd ysumm
		
* Column 10
xi: xtreg log_pc_x_totexp win term_1v23 i.year if abs(margin_rel) <= `bw_IK', fe robust cluster(idcode_prov)
estadd ysumm

** Panel B: Term Limited vs. Non-Term Limited **
* Column 1
reg log_pc_x_totexp win term_12v3, robust cluster(idcode_prov)
estadd ysumm
	
* Column 2
xi: xtreg log_pc_x_totexp win term_12v3 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 3
reg log_pc_x_totexp win term_12v3 mv_1 dmv_1, robust cluster(idcode_prov)
estadd ysumm

* Column 4
xi: xtreg log_pc_x_totexp win term_12v3 mv_1 dmv_1 i.year, fe robust cluster(idcode_prov)
estadd ysumm
	
* Column 5
reg log_pc_x_totexp win term_12v3 mv_1 dmv_1 mv_2 dmv_2, robust cluster(idcode_prov)
estadd ysumm

* Column 6
xi: xtreg log_pc_x_totexp win term_12v3 mv_1 dmv_1 mv_2 dmv_2 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 7
reg log_pc_x_totexp win term_12v3 if abs(margin_rel) <= `bw_CCT', robust cluster(idcode_prov)
estadd ysumm
		
* Column 8
xi: xtreg log_pc_x_totexp win term_12v3 i.year if abs(margin_rel) <= `bw_CCT', fe robust cluster(idcode_prov)
estadd ysumm

* Column 9
reg log_pc_x_totexp win term_12v3 if abs(margin_rel) <= `bw_IK', robust cluster(idcode_prov)
estadd ysumm
		
* Column 10
xi: xtreg log_pc_x_totexp win term_12v3 i.year if abs(margin_rel) <= `bw_IK', fe robust cluster(idcode_prov)
estadd ysumm

** Panel C: Terms **
* Column 1
reg log_pc_x_totexp win term_1 term_3, robust cluster(idcode_prov)
estadd ysumm
	
* Column 2
xi: xtreg log_pc_x_totexp win term_1 term_3 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 3
reg log_pc_x_totexp win term_1 term_3 mv_1 dmv_1, robust cluster(idcode_prov)
estadd ysumm

* Column 4
xi: xtreg log_pc_x_totexp win term_1 term_3 mv_1 dmv_1 i.year, fe robust cluster(idcode_prov)
estadd ysumm
	
* Column 5
reg log_pc_x_totexp win term_1 term_3 mv_1 dmv_1 mv_2 dmv_2, robust cluster(idcode_prov)
estadd ysumm

* Column 6
xi: xtreg log_pc_x_totexp win term_1 term_3 mv_1 dmv_1 mv_2 dmv_2 i.year, fe robust cluster(idcode_prov)
estadd ysumm

* Column 7
reg log_pc_x_totexp win term_1 term_3 if abs(margin_rel) <= `bw_CCT', robust cluster(idcode_prov)
estadd ysumm
		
* Column 8
xi: xtreg log_pc_x_totexp win term_1 term_3 i.year if abs(margin_rel) <= `bw_CCT', fe robust cluster(idcode_prov)
estadd ysumm

* Column 9
reg log_pc_x_totexp win term_1 term_3 if abs(margin_rel) <= `bw_IK', robust cluster(idcode_prov)
estadd ysumm
		
* Column 10
xi: xtreg log_pc_x_totexp win term_1 term_3 i.year if abs(margin_rel) <= `bw_IK', fe robust cluster(idcode_prov)
estadd ysumm
